/*
  MEC_PID.h
*/

#ifndef MEC_PID_h
#define MEC_PID_h
#include "Arduino.h"

class MEC_PID
{
  public:  
		MEC_PID(float, float, float);
	 void setParameter(float, float, float);
	 float getOutput(float,float, int);
	
  private:  
	  float kP;
	  float kI;
	  float kD;
	  float pVal;
		float iVal;
		float dVal;
		float output;  //The PID output value
		float error; //Difference between feedback and setPoint [P and D]
		float errorSum; //Sum of all previous errors [I]
		float errorOld; //Error one sample ago [D]
};
#endif